\documentclass[
  journal=jps,
  manuscript=article-type,
  year=202x,
  volume=xx,
]{cup-journal}

\usepackage[nopatch]{microtype}
\usepackage{graphicx}
\usepackage[dvipsnames]{xcolor}
\usepackage{amsmath,amsfonts} %,amssymb}
\usepackage{enumitem} % For reducing bullet list item separation
\usepackage{libertine}
\usepackage{inconsolata} % nicer fixed width font
\usepackage{booktabs}
\usepackage{float}
\usepackage[explicit]{titlesec}

%% Set document color scheme
\definecolor{black50}{gray}{0.5} % 50% black for hrules
\definecolor{color0}{RGB}{0,0,0} % Base
\definecolor{color1}{RGB}{59,90,198} % author email, doi
\definecolor{color2}{RGB}{16,131,16} %

\title{A Two Path Theory of Context Effects: Pseudoenvironments and Social Cohesion}

%% Author and affiliation
%\usepackage{authblk}
%\setlength{\affilsep}{16.5pt} % 16.5pts between base of author line and base of affil line
%\renewcommand\Authfont{\color{color0}\normalfont\sffamily\bfseries\fontsize{9}{11}\selectfont}
%\renewcommand\Affilfont{\color{color0}\normalfont\sffamily\fontsize{7}{8}\selectfont}
%\renewcommand\AB@affilsepx{; \protect\Affilfont}
%\renewcommand\Authands{, and }

%\makeatletter
%\renewcommand\AB@authnote[1]{{\normalfont\textsuperscript{#1}}}
%\renewcommand\AB@affilnote[1]{{\normalfont\textsuperscript{#1}}}
%\makeatother

%\author[a]{Anon}
\author{Cara Wong}
\affiliation{Department of Political Science, University of Illinois at Urbana-Champaign}
\author{Jake Bowers}
\affiliation{Department of Political Science, University of Illinois at Urbana-Champaign}
\author{Daniel Rubenson}
\affiliation{Department of Politics, University of Toronto}
\author{Mark Fredrickson}
\affiliation{Department of Statistics, University of Michigan}
\author{Ashlea Rundlett}
\affiliation{Department of Political Science, University of Rhode Island}
%
%\affil[a]{Anon}

%\usepackage[numbers,sort&compress,merge,round]{natbib}
%\setlength{\bibsep}{0.0pt}

\date{\today}
%\doi{\url{www.pnas.org/cgi/doi/10.1073/pnas.XXXXXXXXXX}}

\graphicspath{{.}{..}{../Figures_Tables/}}

\addbibresource{SocialCohesion2022_biber.bib}
\usepackage[colorlinks=true, allcolors=blue]{hyperref}

% https://tex.stackexchange.com/questions/345764/journal-class-shows-package-hyperref-warning-suppressing-link-with-empty-targe
%\makeatletter
%\renewcommand*\aa@pageof{, page \thepage{} of \pageref*{LastPage}}
%\makeatother

\let\oldpageref\pageref
\renewcommand{\pageref}{\oldpageref*}
\usepackage[todonotes={textsize=footnotesize}]{changes}
\usepackage{listings}
\lstset{
  language=R,                     % the language of the code
  basicstyle=\normalsize\ttfamily, % the size of the fonts that are used for the code
  numbers=left,                   % where to put the line-numbers
  numberstyle=\tiny\color{NavyBlue},  % the style that is used for the line-numbers
  stepnumber=1,                   % the step between two line-numbers. If it is 1, each line
                                  % will be numbered
  numbersep=5pt,                  % how far the line-numbers are from the code
  backgroundcolor=\color{white},  % choose the background color. You must add \usepackage{color}
  showspaces=false,               % show spaces adding particular underscores
  showstringspaces=false,         % underline spaces within strings
  showtabs=false,                 % show tabs within strings adding particular underscores
  frame=single,                   % adds a frame around the code
  rulecolor=\color{black},        % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here))
  tabsize=2,                      % sets default tabsize to 2 spaces
  captionpos=b,                   % sets the caption-position to bottom
  breaklines=true,                % sets automatic line breaking
  breakatwhitespace=false,        % sets if automatic breaks should only happen at whitespace
  keywordstyle=\color{NavyBlue},      % keyword style
  commentstyle=\color{OliveGreen},   % comment style
  stringstyle=\color{OliveGreen}      % string literal style
}
%\lstMakeShortInline[columns=fixed]

%These next lines tell latex that it is ok to have a practice single graphic
%taking up most of a page, and they also decrease the space around
%figures and tables.
\renewcommand\floatpagefraction{.9}
\renewcommand\topfraction{.9}
\renewcommand\bottomfraction{.9}
\renewcommand\textfraction{.1}
\setcounter{totalnumber}{50}
\setcounter{topnumber}{50}
\setcounter{bottomnumber}{50}
\setlength{\intextsep}{1ex}
\setlength{\floatsep}{1ex}
\setlength{\textfloatsep}{1ex}
% Tighter tables
% https://tex.stackexchange.com/questions/31672/column-and-row-padding-in-tables
\renewcommand{\arraystretch}{.6} % Default value: 1


\begin{document}

\maketitle

\begin{abstract}
  \input{abstract}
\end{abstract}


\input{body}
%TODO: Fill out these sections
\paragraph{Acknowledgments}
We are grateful for the technical assistance of A. Author.


\paragraph{Funding Statement}
This research was supported by grants from the <funder-name><doi>(<award ID>); <funder-name><doi>(<award ID>).

\paragraph{Competing Interests}
A statement about any financial, professional, contractual or personal relationships or situations that could be perceived to impact the presentation of the work --- or `None' if none exist

\paragraph{Data Availability Statement}
A statement about how to access data, code and other materials allowing users to understand, verify and replicate findings --- e.g. Replication data and code can be found in Harvard Dataverse: \verb+\url{https://doi.org/link}+.

\paragraph{Ethical Standards}
The research meets all ethical guidelines, including adherence to the legal requirements of the study country.

\paragraph{Author Contributions}
Please provide an author contributions statement using the CRediT taxonomy roles as a guide {\verb+\url{https://www.casrai.org/credit.html}+}. Conceptualization: A.A; A.B. Methodology: A.A; A.B. Data curation: A.C. Data visualisation: A.C. Writing original draft: A.A; A.B. All authors approved the final submitted draft.


%\endnote in some journals will behave like \footnote; and \printendnotes will not output anything. 
\printendnotes

\printbibliography

\newpage

\appendix

\include{appendix_body}



\end{document}
